package io.p2p.stream.turn.protocol;


import io.p2p.stream.turn.handler.TurnBaseHandler;

import java.util.HashMap;
import java.util.Map;

public class TcpProtocolManagerFactory {
    private static final Map<String, TurnBaseHandler> protocolMapping = new HashMap<>();

    static{

    }

    public static TurnBaseHandler getHandler(String protocol) {
        TurnBaseHandler handlerClass = protocolMapping.get(protocol);

        if(handlerClass == null){
            throw new IllegalArgumentException("Unsupported protocol: " + protocol);
        }

        return handlerClass;
    }
}
